Skip to content

Conversation

mmstick
Copy link
Member

@mmstick mmstick commented Oct 2, 2025

@ids1024 Saw an opportunity to use concurrency with your socket-activation PR when spawning components. It could be placebo, but the desktop seems to load faster with this change.

@mmstick mmstick requested a review from ids1024 October 2, 2025 21:33
@mmstick mmstick changed the title perf: spawn desktop compoonents concurrently perf: spawn desktop components concurrently Oct 2, 2025
components
.into_iter()
.map(|name| async move {
let span = info_span!(parent: None, "{}", name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does creating an info_span! in a loop like this work properly?

https://docs.rs/tracing/0.1.41/tracing/struct.Span.html takes &'static Metadata<'static> , and macro_rules! span in https://github.com/tokio-rs/tracing/blob/main/tracing/src/macros.rs includes a definition of a static.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants